//
//  ViewController.swift
//  WorkTime
//
//  Created by XiangYe on 2017/6/27.
//  Copyright © 2017年 XiangYe. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    @IBOutlet fileprivate weak var timeLabel: UILabel!

    @IBOutlet weak var morningBtn: UIButton!
    
    @IBOutlet weak var afternoonBtn: UIButton!
    override func viewDidLoad() {
        super.viewDidLoad()
        
        morningBtn.sizeToFit()
        
        afternoonBtn.sizeToFit()
    }

    @IBAction func afternoonAction(_ sender: Any) {
        
        WorkManager.shared.removeHistory()
        
        timeLabel.text = "下班喽"
    }
   
    @IBAction func morningAction(_ sender: Any) {
        
        let workTimeStr = WorkManager.shared.getCurrentTime()
        
        timeLabel.text = workTimeStr
        
    }
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

